import React, { memo } from "react";

interface EmployeeProps {
  name: string;
  title: string;
}

const Employee: React.FC<EmployeeProps> = memo(({ name, title }) => {
  console.log(`${name} 重新渲染了！`);
  return (
    <div className="employee">
      <h3>{name}</h3>
      <p>{title}</p>
    </div>
  );
});

export default Employee;
